\hypertarget{cmd__client_8c}{}\doxysection{cmd\+\_\+client.\+c File Reference}
\label{cmd__client_8c}\index{cmd\_client.c@{cmd\_client.c}}
{\ttfamily \#include $<$stdio.\+h$>$}\newline
{\ttfamily \#include $<$string.\+h$>$}\newline
{\ttfamily \#include $<$errno.\+h$>$}\newline
{\ttfamily \#include $<$stdlib.\+h$>$}\newline
{\ttfamily \#include $<$unistd.\+h$>$}\newline
{\ttfamily \#include $<$sys/socket.\+h$>$}\newline
{\ttfamily \#include $<$sys/types.\+h$>$}\newline
{\ttfamily \#include $<$sys/stat.\+h$>$}\newline
{\ttfamily \#include $<$netinet/in.\+h$>$}\newline
{\ttfamily \#include $<$arpa/inet.\+h$>$}\newline
{\ttfamily \#include $<$dirent.\+h$>$}\newline
{\ttfamily \#include $<$fcntl.\+h$>$}\newline
{\ttfamily \#include \char`\"{}ftp\+\_\+client.\+h\char`\"{}}\newline
{\ttfamily \#include \char`\"{}cmd\+\_\+client.\+h\char`\"{}}\newline
Include dependency graph for cmd\+\_\+client.\+c\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{cmd__client_8c__incl}
\end{center}
\end{figure}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{cmd__client_8c_ac29c297ae32acdb2172e926d5f144681}\label{cmd__client_8c_ac29c297ae32acdb2172e926d5f144681}} 
void {\bfseries show\+\_\+help} ()
\begin{DoxyCompactList}\small\item\em 在客户端展示帮助信息。 \end{DoxyCompactList}\item 
void \mbox{\hyperlink{cmd__client_8c_a1e44b6b3f9491381268f9d0b977185b8}{ftp\+\_\+cmd\+\_\+filename}} (char $\ast$user\+\_\+cmd, char $\ast$src\+\_\+file, char $\ast$dst\+\_\+file)
\begin{DoxyCompactList}\small\item\em 读取客户端命令后的文件名字。 \end{DoxyCompactList}\item 
\mbox{\Hypertarget{cmd__client_8c_a6aac4e5b4b6e520bfc90d7507c2659bc}\label{cmd__client_8c_a6aac4e5b4b6e520bfc90d7507c2659bc}} 
void {\bfseries choose\+\_\+file\+\_\+type} (\mbox{\hyperlink{structMsg}{Msg}} $\ast$msg)
\begin{DoxyCompactList}\small\item\em 提示用户选择文件传输模式。支持\+ASCII和\+Binary。 \end{DoxyCompactList}\item 
\mbox{\Hypertarget{cmd__client_8c_ad378bfcab53bdae7f4b98336fa2fc10e}\label{cmd__client_8c_ad378bfcab53bdae7f4b98336fa2fc10e}} 
void {\bfseries ftp\+\_\+put} (\mbox{\hyperlink{structMsg}{Msg}} $\ast$msg)
\begin{DoxyCompactList}\small\item\em PUT命令 \end{DoxyCompactList}\item 
\mbox{\Hypertarget{cmd__client_8c_acac70a76f405eb636128febfb0af92b1}\label{cmd__client_8c_acac70a76f405eb636128febfb0af92b1}} 
void {\bfseries ftp\+\_\+get} (\mbox{\hyperlink{structMsg}{Msg}} $\ast$msg)
\begin{DoxyCompactList}\small\item\em GET命令 \end{DoxyCompactList}\item 
\mbox{\Hypertarget{cmd__client_8c_aa4de1281c324079b1c30bc1cedd406a9}\label{cmd__client_8c_aa4de1281c324079b1c30bc1cedd406a9}} 
void {\bfseries ftp\+\_\+list} (\mbox{\hyperlink{structMsg}{Msg}} $\ast$msg)
\begin{DoxyCompactList}\small\item\em LS命令 \end{DoxyCompactList}\item 
\mbox{\Hypertarget{cmd__client_8c_a8be8aad77880f84bc46b4102d654e7c7}\label{cmd__client_8c_a8be8aad77880f84bc46b4102d654e7c7}} 
void {\bfseries ftp\+\_\+pwd} (\mbox{\hyperlink{structMsg}{Msg}} $\ast$msg)
\begin{DoxyCompactList}\small\item\em PWD命令 \end{DoxyCompactList}\item 
\mbox{\Hypertarget{cmd__client_8c_a3a82fe0eb6ae64cc36450b4cd427aee2}\label{cmd__client_8c_a3a82fe0eb6ae64cc36450b4cd427aee2}} 
void {\bfseries ftp\+\_\+cd} (\mbox{\hyperlink{structMsg}{Msg}} $\ast$msg)
\begin{DoxyCompactList}\small\item\em CD命令 \end{DoxyCompactList}\item 
\mbox{\Hypertarget{cmd__client_8c_a1f562e4723804de2f79a6eeeac09101a}\label{cmd__client_8c_a1f562e4723804de2f79a6eeeac09101a}} 
void {\bfseries ftp\+\_\+quit} (\mbox{\hyperlink{structMsg}{Msg}} $\ast$msg)
\begin{DoxyCompactList}\small\item\em QUIT命令 \end{DoxyCompactList}\item 
\mbox{\Hypertarget{cmd__client_8c_a4ac312058d761fdcd4fcad635109be2b}\label{cmd__client_8c_a4ac312058d761fdcd4fcad635109be2b}} 
void {\bfseries ftp\+\_\+delete} (\mbox{\hyperlink{structMsg}{Msg}} $\ast$msg)
\begin{DoxyCompactList}\small\item\em DELETE命令 \end{DoxyCompactList}\item 
\mbox{\Hypertarget{cmd__client_8c_ad09107aa153b09da2cd98b8db15f1a23}\label{cmd__client_8c_ad09107aa153b09da2cd98b8db15f1a23}} 
void {\bfseries ftp\+\_\+mkdir} (\mbox{\hyperlink{structMsg}{Msg}} $\ast$msg)
\begin{DoxyCompactList}\small\item\em MKDIR命令 \end{DoxyCompactList}\item 
\mbox{\Hypertarget{cmd__client_8c_a79c650194ffc71227a05a75ee584edff}\label{cmd__client_8c_a79c650194ffc71227a05a75ee584edff}} 
void {\bfseries ftp\+\_\+rmdir} (\mbox{\hyperlink{structMsg}{Msg}} $\ast$msg)
\begin{DoxyCompactList}\small\item\em RMDIR命令 \end{DoxyCompactList}\item 
\mbox{\Hypertarget{cmd__client_8c_a20287282a4176cb60d52aa1006223d37}\label{cmd__client_8c_a20287282a4176cb60d52aa1006223d37}} 
void {\bfseries local\+\_\+list} ()
\begin{DoxyCompactList}\small\item\em 本地\+LLS命令 \end{DoxyCompactList}\item 
\mbox{\Hypertarget{cmd__client_8c_adea1a1e277785005410106330dbd4e10}\label{cmd__client_8c_adea1a1e277785005410106330dbd4e10}} 
void {\bfseries local\+\_\+pwd} ()
\begin{DoxyCompactList}\small\item\em 本地\+LPWD命令 \end{DoxyCompactList}\item 
\mbox{\Hypertarget{cmd__client_8c_aeca792fc35e08ffefefcc50c7ab7a4b9}\label{cmd__client_8c_aeca792fc35e08ffefefcc50c7ab7a4b9}} 
void {\bfseries local\+\_\+cd} (char $\ast$user\+\_\+cmd)
\begin{DoxyCompactList}\small\item\em 本地\+LCD命令 \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Implementation of the commands in the ftp client.

\begin{DoxyAuthor}{Author}
wgy 
\end{DoxyAuthor}
\begin{DoxyVersion}{Version}
V1.\+0 
\end{DoxyVersion}
\begin{DoxyDate}{Date}
2022-\/11-\/13 
\end{DoxyDate}
\begin{DoxyCopyright}{Copyright}
GNU Public License V3.\+0 
\end{DoxyCopyright}


\doxysubsection{Function Documentation}
\mbox{\Hypertarget{cmd__client_8c_a1e44b6b3f9491381268f9d0b977185b8}\label{cmd__client_8c_a1e44b6b3f9491381268f9d0b977185b8}} 
\index{cmd\_client.c@{cmd\_client.c}!ftp\_cmd\_filename@{ftp\_cmd\_filename}}
\index{ftp\_cmd\_filename@{ftp\_cmd\_filename}!cmd\_client.c@{cmd\_client.c}}
\doxysubsubsection{\texorpdfstring{ftp\_cmd\_filename()}{ftp\_cmd\_filename()}}
{\footnotesize\ttfamily void ftp\+\_\+cmd\+\_\+filename (\begin{DoxyParamCaption}\item[{char $\ast$}]{user\+\_\+cmd,  }\item[{char $\ast$}]{src\+\_\+file,  }\item[{char $\ast$}]{dst\+\_\+file }\end{DoxyParamCaption})}



读取客户端命令后的文件名字。 


\begin{DoxyParams}{Parameters}
{\em user\+\_\+cmd} & 客户端命令 \\
\hline
{\em src\+\_\+file} & 全路径名 \\
\hline
{\em dst\+\_\+file} & 文件名 \\
\hline
\end{DoxyParams}
